package com.yunji.hushuang.plugin;


/**
 * @author hushuang
 * @since 2019/10/06
 */
public interface Interceptor {

    /**
     * 返回一个代理对象，已有默认实现
     */
    default Object plugin(Object target) {
        return Plugin.wrap(target, this);
    }

    Object intercept(Invocation invocation) throws Exception;

}
